<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>订单查询</title>
    <style type="text/css">
    </style>
    <jsp:include page="../../import.jsp" flush="true"/>
    <script type="text/javascript">
        var grid = null;
        $(function () {
            $("#searchBar").ligerForm();
            $("#ligergrid1").ligerGrid({
                url: '<%=path%>/custpay/cmmOrderQuery/initcmmOrderQueryList.do',
                method : 'get',
                parms:getSearchParams(),
                columns: [
                    { display: '订单号', name: 'orderId', width: 200, align: 'center', enabledSort:true},
                    { display: '代扣结果', name: 'daikouResult', width: 200, align: 'center', enabledSort:true},
                    { display: '结果描述', name: 'daikouResultDesc', width: 200, align: 'center', enabledSort:true},
                    { display: '扣款金额(元)', name: 'payAmt', width: 120, align: 'center', enabledSort:true},
                    { display: '扣款时间', name: 'daikouTime', width: 150, align: 'center', enabledSort:true},
                    { display: '支付平台', name: 'payType', width: 120, align: 'center', enabledSort:true}
                ],
                pageSize:10,
                root:'rows',
                record:'total',
                hideLoadButton : true,
                width: '100%',
                height:'100%',
                heightDiff:-2,
                //checkbox:true,
                rownumbers:false,
                onBeforeShowData: function ()
                {
                    var grid = this;
                    grid.collapsedRows = [];
                }
            });
            grid = liger.get("ligergrid1");

            $("#searchBtn").click(function(event) {
                var form = new liger.get("searchBar");
                var data = form.getData();
                console.log(data);
                for (name in data){
                    grid.setParm(name,data[name]);
                };
                grid.reload();
            });
            $("#clearBtn").click(function(event) {
                clearLigerForm("searchBar");
            });
            $("#dateform").ligerForm();
        });

        //查询参数
        function getSearchParams(){
            var form = new liger.get("searchBar");
            var data = form.getData();
            return data;
        }
        //格式化时间
        function renderDate(rowdata, index, value){
            var dateStr = "";
            if(null != value){
                var date = new Date(value);
                dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
            }
            return dateStr;
        }
    </script>
</head>

<body class="iframeBody">
<div class="Wrapper">
    <div class="searchArea">
        <form id="searchBar">
            <div class="fieldset1 clearFix">
                <div class="fieldBox">
                    <div class="label">订单号</div>
                    <div class="field">
                        <input name="orderid" id="orderid" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="clearFix"></div>
                <div class="btnsBox">
                    <span id="searchBtn" class="sq-button sq-button-hasicon"><i class="sqBtnIco_1"></i>查询</span>
                    <span id="clearBtn" class="sq-button sq-button-hasicon"><i class="sqBtnIco_19"></i>清空</span>
                    <input id="resetBtn" type="reset" value="重置" class="l-button l-button-reset Hide"/>
                </div>
            </div>
        </form>
    </div>
</div>
<div id="ligergrid1" class="sq-grid"></div>
</body>
</html>
